LogFormat of access_log

Hi

I am using OS X 10.11.2 and Server 5.0.11.

My access_log in /var/log/apache2/ is always like "xxx aa.bb.cc.dd - - [26/Oct/2015:12:30:39 +0900] "GET ..."

even I accessed the server(xxx) from other macs. The xxx and IP are the hostname and IP of the server, not of the macs.

The access host might be wrong. I expect that the server and IP must be a hostname of macs and its IP.

LogFormat "%h....".


Thanks

Tac

iMac, OS X El Capitan (10.11.1)

Posted on Oct 29, 2015 12:46 AM

Reply
2 replies

Dec 1, 2015 1:39 AM in response to situkak

It sounds like you have the apache caching proxy enabled - this used to be called the Performance Cache, but it may be different now. The proxy sits in front of Apache, intercepting incoming requests and only passing cache misses to Apache. Since Apache sees the connection from the proxy, which is running on the same box, the IP address it sees is the IP address of the server.


There are a couple of ways of getting around it, and it's been a while since I've played with it, but the simplest may be to disable the proxy. It doesn't serve a huge purpose for most people. If you do want/need the cache then you need to adjust the logging to include the X-Forwarded-For headers instead of the client IP.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

LogFormat of access_log

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.